
package org.springblade.common.enums.rate;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 状态
 * @author samwuu
 */
@Getter
@AllArgsConstructor
public enum AuditStatusEnum {

	NO_AUDIT("未审核", 0),
	DONE("审核通过", 1),
	FAIL("审核拒绝", 2),
	;

	final String desc;
	final int key;

	public static AuditStatusEnum getEnum(Integer key) {
		if (key == null) {
			return null;
		} else {
			for (AuditStatusEnum s : AuditStatusEnum.values()) {
				if (s.getKey() == key) {
					return s;
				}
			}
			return null;
		}
	}

}
